package com.imooc.reader.management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.imooc.reader.management.entity.User;
import org.apache.ibatis.annotations.Select;

public interface UserMapper extends BaseMapper<User> {
    @Select("select distinct u.* from user u , role_user ru , role r where u.user_id = ru.user_id and ru.role_id = r.role_id and r.role_code = #{roleCode}")
    IPage<User> selectByRoleCode(IPage page , String roleCode);
}
